class AddDynamicToMaintenance < ActiveRecord::Migration
  def self.up
    add_column :maintenances,:dynamic_check_in_time,:datetime
    add_column :maintenances,:dynamic_check_out_time,:datetime
    add_column :maintenances,:dynamic_flag,:integer,:default => 0      #标志位，0-只有静态或者动态作业，1-包括静动态作业
    add_column :maintenances,:dynamic_during_minute,:integer
    add_column :maintenances,:dynamic_finish_minute,:integer
    add_column :maintenances,:dynamic_end_minute,:integer
    add_column :maintenances,:dynamic_un_start_minute,:integer
  end

  def self.down
    remove_column :maintenances,:dynamic_check_in_time
    remove_column :maintenances,:dynamic_check_out_time
    remove_column :maintenances,:dynamic_during_minute
    remove_column :maintenances,:dynamic_finish_minute
    remove_column :maintenances,:dynamic_end_minute
    remove_column :maintenances,:dynamic_un_start_minute
  end
end
